package uk.co.mmscomputing.io;

public interface BitSwapTable{

  public byte[] bitSwapTable={ 
    0x0,0xffffff80,0x40,0xffffffc0,0x20,0xffffffa0,0x60,0xffffffe0,
    0x10,0xffffff90,0x50,0xffffffd0,0x30,0xffffffb0,0x70,0xfffffff0,
    0x8,0xffffff88,0x48,0xffffffc8,0x28,0xffffffa8,0x68,0xffffffe8,
    0x18,0xffffff98,0x58,0xffffffd8,0x38,0xffffffb8,0x78,0xfffffff8,
    0x4,0xffffff84,0x44,0xffffffc4,0x24,0xffffffa4,0x64,0xffffffe4,
    0x14,0xffffff94,0x54,0xffffffd4,0x34,0xffffffb4,0x74,0xfffffff4,
    0xc,0xffffff8c,0x4c,0xffffffcc,0x2c,0xffffffac,0x6c,0xffffffec,
    0x1c,0xffffff9c,0x5c,0xffffffdc,0x3c,0xffffffbc,0x7c,0xfffffffc,
    0x2,0xffffff82,0x42,0xffffffc2,0x22,0xffffffa2,0x62,0xffffffe2,
    0x12,0xffffff92,0x52,0xffffffd2,0x32,0xffffffb2,0x72,0xfffffff2,
    0xa,0xffffff8a,0x4a,0xffffffca,0x2a,0xffffffaa,0x6a,0xffffffea,
    0x1a,0xffffff9a,0x5a,0xffffffda,0x3a,0xffffffba,0x7a,0xfffffffa,
    0x6,0xffffff86,0x46,0xffffffc6,0x26,0xffffffa6,0x66,0xffffffe6,
    0x16,0xffffff96,0x56,0xffffffd6,0x36,0xffffffb6,0x76,0xfffffff6,
    0xe,0xffffff8e,0x4e,0xffffffce,0x2e,0xffffffae,0x6e,0xffffffee,
    0x1e,0xffffff9e,0x5e,0xffffffde,0x3e,0xffffffbe,0x7e,0xfffffffe,
    0x1,0xffffff81,0x41,0xffffffc1,0x21,0xffffffa1,0x61,0xffffffe1,
    0x11,0xffffff91,0x51,0xffffffd1,0x31,0xffffffb1,0x71,0xfffffff1,
    0x9,0xffffff89,0x49,0xffffffc9,0x29,0xffffffa9,0x69,0xffffffe9,
    0x19,0xffffff99,0x59,0xffffffd9,0x39,0xffffffb9,0x79,0xfffffff9,
    0x5,0xffffff85,0x45,0xffffffc5,0x25,0xffffffa5,0x65,0xffffffe5,
    0x15,0xffffff95,0x55,0xffffffd5,0x35,0xffffffb5,0x75,0xfffffff5,
    0xd,0xffffff8d,0x4d,0xffffffcd,0x2d,0xffffffad,0x6d,0xffffffed,
    0x1d,0xffffff9d,0x5d,0xffffffdd,0x3d,0xffffffbd,0x7d,0xfffffffd,
    0x3,0xffffff83,0x43,0xffffffc3,0x23,0xffffffa3,0x63,0xffffffe3,
    0x13,0xffffff93,0x53,0xffffffd3,0x33,0xffffffb3,0x73,0xfffffff3,
    0xb,0xffffff8b,0x4b,0xffffffcb,0x2b,0xffffffab,0x6b,0xffffffeb,
    0x1b,0xffffff9b,0x5b,0xffffffdb,0x3b,0xffffffbb,0x7b,0xfffffffb,
    0x7,0xffffff87,0x47,0xffffffc7,0x27,0xffffffa7,0x67,0xffffffe7,
    0x17,0xffffff97,0x57,0xffffffd7,0x37,0xffffffb7,0x77,0xfffffff7,
    0xf,0xffffff8f,0x4f,0xffffffcf,0x2f,0xffffffaf,0x6f,0xffffffef,
    0x1f,0xffffff9f,0x5f,0xffffffdf,0x3f,0xffffffbf,0x7f,0xffffffff,
  };

/*
  static{
    bitSwapTable=new byte[256];
    int s=0;
    for(int t=0;t<256;t++){
      bitSwapTable[t]=(byte)s;
      int u=256;
      do{
        u>>=1;
        s^=u; 
      }while((s^u)>s);
    }
  }
*/
}
